<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-bind:style="{width:widthStyle,height:heightStyle,border:borderStyle}"></div>
        <div v-bind:style="objStyle"></div>
        <div v-bind:style="[objStyle,overStyle]"></div>
        <button v-on:click="handle">点击</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                borderStyle: '1px solid skyblue',
                widthStyle: '100px',
                heightStyle: '200px',
                objStyle: {
                    border: '1px solid lime',
                    width: '200px',
                    height: '100px',
                },
                overStyle: {
                    border: '5px solid pink',
                    backgroundColor: 'yellow',
                },
            },
            methods: {
                handle: function() {
                    this.heightStyle = '100px';
                    this.objStyle.width = '100px';
                },
            },
        });
    </script>
</body>

</html>